using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FutureOpen.Web.Pages;
using FreeTextBoxControls;
using FutureOpen.Core.func.sql;

public partial class test_GroupArtNew : PageBase
{
    private int uid;
    private int gid;
    protected void Page_Load(object sender, EventArgs e)
    {
        base.PageInit();
        CheckLogin();

        if (IsLogin())
        {
            uid = MyUsr;
        }
        this.gid = this.orgid;
       
    }
    protected void btBlodPublish_Click(object sender, EventArgs e)
    {
        if (IsLogin())
        {
            string title = this.tbBlogTitle.Text;
            //FreeTextBox ftextbox = (FreeTextBoxControls.FreeTextBox)this.Page.Master.FindControl("MainContentPlaceHolder").FindControl("FreeTextBox1");
            string content = this.HtmlEditor1.Text;
            //TopicProvider.AddBlog(tbBlogTitle.Text, content, uid);
            GroupProvider.AddTopic(gid, title, content, uid);
            Response.Redirect("GroupView.aspx?orgid="+gid);
        }
        else
        {
            GoBack();
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Redirect("GroupView.aspx?orgid=" + gid);
    }
}
